package com.clusterswisdom.horn.api.tmall.action.eticket;

import com.alibaba.fastjson.JSONObject;
import com.clusterswisdom.horn.api.ioc.HornAction;
import com.clusterswisdom.horn.api.ioc.HornResponse;
import com.clusterswisdom.horn.api.ioc.api.ApiConfig;
import com.clusterswisdom.horn.api.tmall.TmallInstance;
import com.clusterswisdom.horn.api.tmall.action.AbstractTmallAction;
import com.taobao.api.response.VmarketEticketResendResponse;

public class ResendEteticketAction extends AbstractTmallAction implements HornAction{
	@Override
	public HornResponse execute(ApiConfig config, JSONObject param)
			throws Exception {
		VmarketEticketResendResponse response=(VmarketEticketResendResponse)TmallInstance.getInstance().executeRequest(param, "eticket", "vmarketEticketResend");
		if(response.isSuccess() && response.getRetCode()==1){
			return new HornResponse(true, null);
			
		}else{
			return getUnsuccessResponse(response);
			
		}
	}
}
